home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#33 (Jun 88)
/
serial demo
/
Globals.pas
next >
Wrap
Pascal/Delphi Source File
|
1988-05-02
|
2KB
|
68 lines
UNIT Globals;
INTERFACE
CONST
rsrc = 'SERL';
aAbout = 1;
lastMenu = 408; { number of menus }
appleMenu = 403; { menu ID for desk accessory menu }
fileMenu = 404; { menu ID for File menu }
editMenu = 405; { menu ID for Edit menu }
baudMenu = 406;
MessageDialog = 256;
AboutDialog = 257;
b300 = 1;
b1200 = 2;
b2400 = 3;
b4800 = 4;
b9600 = 5;
b19200 = 6;
parityMenu = 407;
noP = 1;
evenP = 2;
oddP = 3;
bitsMenu = 408;
bData7 = 1;
bData8 = 2;
bStop1 = 4;
bStop15 = 5;
bStop2 = 6;
{- - - - - - - - - - - - - - - - - - - - - - - - serial port - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }
inBuffLength = 2048;
XONCHAR = 17;
XOFFCHAR = 19;
CrRtn = 13;
LineFeed = 10;
VAR
myMenus : ARRAY[applemenu..lastMenu] OF MenuHandle;
dragRect : Rect;
doneFlag : BOOLEAN;
myEvent : EventRecord;
row, rowA, rowB, column, columnA, columnB, code, refNum : INTEGER;
WindowA, WindowB, theWindow, whichWindow : WindowPtr;
windowlines, NumWindows, theMenu, theItem : INTEGER;
Charread : CHAR;
Urgn : rgnhandle;
savePort : GrafPtr;
oneCount : Longint;
{----------------------- serial port variables ----------------------------}
inBuffPtr, filterBuffPtr, outBuffPtr : Ptr;
inBuffPtrA, filterBuffPtrA, outBuffPtrA : Ptr;
inBuffPtrB, filterBuffPtrB, outBuffPtrB : Ptr;
inRefNumA, outRefNumA : INTEGER;
inRefNumB, outRefNumB : INTEGER;
inRefNum, outRefNum, err : INTEGER;
serConfig, {sum of following vars}
baud, parity, dataBits, stopBits : INTEGER;
portA : Boolean;
IMPLEMENTATION
END.